<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/html">
<head>
    <meta charset="UTF-8">
    <title>主机管理</title>
    <link href="__PUBLIC__/layui/css/layui.css" rel="stylesheet" />
</head>

<form class="layui-form" method="post">
    <div class="layui-form-item" style="padding-top: 2%">
        <label class="layui-form-label">服务平台：</label>
        <div class="layui-input-block">
            <volist name=":C('ServerProvider')" id="serverconfig">
                <input type="checkbox" name="ServerProvider[{$serverconfig['val']}]" <if condition="$serverconfig['is_display']">checked</if>  title="{$key}" >
            </volist>
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn" lay-submit lay-filter="sitesub">提交</button>
        </div>
    </div>
</form>
<script type="text/javascript" src="__PUBLIC__/layui/layui.js"></script>
<script>
    var form,layer,$;
    layui.use(['layer', 'form'], function () {
        form = layui.form();
        $ = layui.jquery
        layer = layui.layer;
        form.on('submit(sitesub)', function(data){
            var userInfo = data.field;
            var url = "__SELF__";
            $.post(url,userInfo,function(data){
                layer.msg(data['msg'], {
                    icon: 6,
                    time: 2000
                }, function(){
                    location.reload();
                });
            });
            return false;
        });
    })
</script>